package com.basic.modules.nykf.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.basic.common.annotation.CustomizeQueryField;
import com.basic.common.annotation.DictParam;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 客户表实体类
 */
@Data
@TableName("n_ykf_customer")
public class CustomerEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId
    private Long customerId;

    /**
     * 咨询记录ID
     */
    private Long zxid;

    /**
     * 咨询客户name
     */
    @TableField(exist = false)
    private String zxkhName;

    /**
     * 客户名称
     */
    @CustomizeQueryField(name = "客户名称", type = "文本", fieldName = "khmc")
    private String khmc;

    /**
     * 拓客类型(字典)-val marketType
     */
    private String tklxVal;

    /**
     * 拓客类型
     */
    @DictParam(field = "tklxVal", targetField = "tklxName", dictType = "marketType")
    private String tklxName;

    /**
     * 拓客渠道(字典)-val expandType
     */
    @CustomizeQueryField(name = "拓客渠道", type = "字典", dictType = "expandType", fieldName = "tkqd_val")
    private String tkqdVal;

    /**
     * 拓客渠道
     */
    @DictParam(field = "tkqdVal", targetField = "tkqdName", dictType = "expandType")
    private String tkqdName;

    /**
     * 客户首次合作时间
     */
    @CustomizeQueryField(name = "首次合作时间", type = "日期", fieldName = "khschzsj")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date khschzsj;

    /**
     * 关联客户ID
     */
    private Long glkhId;

    /**
     * 关联客户name
     */
    @TableField(exist = false)
    private String glkhName;

    /**
     * 关联关系(字典)-val glgx
     */
    private String glgxVal;

    /**
     * 关联关系
     */
    @DictParam(field = "glgxVal", targetField = "glgxName", dictType = "glgx")
    private String glgxName;

    /**
     * 客户合作状态(字典)-val hzzt
     */
    private String khhzztVal;

    /**
     * 关联关系
     */
    @DictParam(field = "khhzztVal", targetField = "khhzztName", dictType = "hzzt")
    private String khhzztName;

    /**
     * 续费专员ID
     */
    private Long xfzyUserId;

    /**
     * 续费专员名称
     */
    @TableField(exist = false)
    private String xfzyName;

    /**
     * 续费节点(字典)-val xfjd
     */
    private String xfjdVal;

    /**
     * 续费节点
     */
    @DictParam(field = "xfjdVal", targetField = "xfjdName", dictType = "xfjd")
    private String xfjdName;

    /**
     * 客户信息备注
     */
    private String khxxbz;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @TableField(exist = false)
    private String keyword;

    /**
     * 店铺列表
     */
    @TableField(exist = false)
    private List<CustomerShopEntity> customerShopList;

    /**
     * 发票列表
     */
    @TableField(exist = false)
    private List<CustomerFpEntity> customerFpList;

    @TableField(exist = false)
    private List<Map> customizeQueryCondition;
}